<?php
declare(strict_types = 1);
namespace  app\admin\model;
use think\Config;
use think\Model;
class Gcategory extends Model{
    public static function getGcateGory( $data = [] ){
        $model = self::field(true);
        return $model->select();
    }
    public static function Ceng($data=[]){
        if (!$data['id']){
            $list=self::where("parent_id",0)
                ->order('sort_order decs');
            return $list->select();
        }else{
            $list=self::where("parent_id",$data)
                ->order('sort_order decs');
            return $list->select();
        }
    }
}